﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "IEmployeeShift" here, you must also update the reference to "IEmployeeShift" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IEmployeeShift
    {
        [OperationContract]
        bool EmployeeShift_DeleteEmployee(int _departmentID);
        [OperationContract]
        DataSet EmployeeShift_GetAll();

        [OperationContract]
        EmployeeShiftInfo EmployeeShift_GetInfo(int ESID);

        [OperationContract]
        EmployeeShiftInfo EmployeeShift_GetShift(int EmployeeID, DateTime _date);

        [OperationContract]
        DataSet EmployeeShift_GetList(  int DepartmentID, DateTime _date);

        [OperationContract]
        DataSet EmployeeShift_GetWithDepartment(int DepartmentID, int _month, int _year);

        [OperationContract]
        DataSet EmployeeShift_GetEmployee( int DepartmentID);

        [OperationContract]
        int EmployeeShift_Insert(EmployeeShiftInfo eInfo);

        [OperationContract]
        bool EmployeeShift_Update(EmployeeShiftInfo eInfo);

        [OperationContract]
        bool EmployeeShift_Delete(int ESID);

        [OperationContract]
        bool EmployeeShift_CheckExistEmployee(int EmployeeID, int EmployeeShift_ShiftID, DateTime date);

        [OperationContract]
        bool EmployeeShift_InsertAutoShiftHC(int _DepartmentID, DateTime _FromDate, DateTime _ToDate);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class EmployeeShiftInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        int _BranchID;
        [DataMember]
        public int BranchID
        {
            get { return _BranchID; }
            set { _BranchID = value; }
        }

        int _DepartmentID;
        [DataMember]
        public int DepartmentID
        {
            get { return _DepartmentID; }
            set { _DepartmentID = value; }
        }

        int _ShiftID;
        [DataMember]
        public int ShiftID
        {
            get { return _ShiftID; }
            set { _ShiftID = value; }
        }

        DateTime _Date;
        [DataMember]
        public DateTime Date
        {
            get { return _Date; }
            set { _Date = value; }
        }

        DateTime _TimeIn;
        [DataMember]
        public DateTime TimeIn
        {
            get { return _TimeIn; }
            set { _TimeIn = value; }
        }

        DateTime _TimeOut;
        [DataMember]
        public DateTime TimeOut
        {
            get { return _TimeOut; }
            set { _TimeOut = value; }
        }

        DateTime _TimeInB;
        [DataMember]
        public DateTime TimeInB
        {
            get { return _TimeInB; }
            set { _TimeInB = value; }
        }

        DateTime _TimeOutB;
        [DataMember]
        public DateTime TimeOutB
        {
            get { return _TimeOutB; }
            set { _TimeOutB = value; }
        }

        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }

    }
}

